<?
session_start();

require_once('config.php');
require_once('class/cls_product.php');
require_once('right.php');
require_once('class/cls_sales.php');
require_once('class/cls_coordinator.php');


$product		= new cls_product();
$sales			= new cls_sales();
$right 			= new right();
$coordinator    = new cls_coordinator();

$coordinator_id		= $_REQUEST['coordinator_id'];

if (!($_POST['id']))  
{
       header("Location: index.php");
       exit;
}


if (isset($_POST['id']))

{

$sales->insert_usertrack($_POST);

}


?>
<html>
<head>

<title>United Machinery Products</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="bg_sty.css" rel="stylesheet" type="text/css">

<link href="um_sty.css" rel="stylesheet" type="text/css"><style type="text/css">
<!--
.style2 {color: #000000}
.style15 {
	font-size: 18px;
	color: #F49D1B;
}
.style17 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	color: #CF810A;
}
.style22 {
	color: #1C1C79;
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.style23 {
	font-size: 24px;
	color: #0A1C7E;
	font-weight: bold;
	font-family: Tahoma, Arial, Verdana;
}
.style25 {font-family: Geneva, Arial, Helvetica, sans-serif; color: #CF810A; font-weight: bold; }
.style9 {color: #FF9933;
	font-weight: bold;
}
-->
</style></head>



<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#F7F9F0">



<table id="Table_01" width="760" border="0" cellpadding="0" cellspacing="0" align="center">

	<tr>

		<td>

<div align="center">
  <table id="Table_01" width="775" height="32" align="center" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="233" height="32"><img src="images/banner.jpg" width="775" height="100" alt=""></td>
      
    </tr>
  </table>
</div>

<div align="center">

<table id="Table_02" width="775" height="24" align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td width="544" align="left" valign="middle">

		&nbsp;&nbsp;<a  href="index.php" class="ummenu" >Home</a>		

		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		
		<a href="customer_service.php" class="ummenu">Customer Services</a>
		
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		<a href="contact_us.php" class="ummenu">Contact Us</a>
		
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		<a href="aboutus.php" class="ummenu">About Us</a>

		

		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

		<td width="231" height="24" align="right" valign="middle"><a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_ja&trurl=http%3a%2f%2fwww.umgroups.com">

		</a>&nbsp;&nbsp;

		<a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_zt&trurl=http%3a%2f%2fwww.umgroups.com">		</a>&nbsp;&nbsp;

		<a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_ko&trurl=http%3a%2f%2fwww.umgroups.com">		</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
	</tr>

</table>

</div>

</td>

	</tr>

	<tr>
	  <td>

			<table width="775" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC" align="center">

				<tr><td colspan="7" height="20"></td>

				</tr>

				<tr>

					<td width="5" ></td>
 
					<td width="154" rowspan="2" valign="top" class="qcontact" style="padding-left: 4px; padding-top: 40px;" align="left" >
					  <table id="table1" align="left" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0">

<?
		
		//echo "jjj".$_SESSION['username'];
  		$object2 = $coordinator->get_coordinator();
		//echo "<pre>";
		//print_r ($object);
		//echo "</pre>";
		if (count($object2) > 0)
		{
			foreach ($object2 as $row) {
?>

				<tr>

					<td width="40" height="28">

					<img src="main-img/<?= $row['coordinator_id'].".jpg" ?>" width="40" height="28"></td>

					<td height="28">

					<div class="introLinks">

						<a href="um_products.php?coordinator_id=<?= $row['coordinator_id']  ?>">

						<img alt="" src="images/trans.gif" border="0" height="8" width="120"><br>
						&nbsp; 

					  <span style="text-transform: uppercase"><?= $row['coordinator_name']?></span></a></div>

					</td>

				</tr>
				<tr><td height="20px"></td></tr>				

				<tr>

					<td colspan="2">

					<img alt="" src="images/trans.gif" border="0" height="2" width="1"></td>

				</tr>			
				
				<?			}//for
		}//if
		

		?>

				
				

			</table>
					</div>
					
					 
				  </td>

					<td width="11"></td>

				  <td align="center" valign="middle">

				  <table width="100%" cellpadding="0" cellspacing="0">
                      <tr>
                      <td>
					  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
					 <tr>
                      <td height="45" valign="top" align="center">&nbsp;</td>
                    </tr>
                    <tr>
					  <tr>
						<td  height="50px"  style="padding-left:40px;"><b>You have added the following item to your shopping cart:</b></td>
					  </tr>
					</table>
					  <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0" >
					 
			 <p> <tr>
				<td><b>Brand :</b>&nbsp;&nbsp; <? echo "$_POST[brand]"; ?></td>
			  </tr>
			  <tr>
				<td><b>Type :</b>&nbsp;&nbsp;<? echo "$_POST[type]"; ?></td>
			  </tr>
			  <tr>
				<td><b>Quantity :</b>&nbsp;&nbsp;<? echo "$_POST[qty]"; ?></td>
			  </tr>
			  <tr>
				<td><b>Single Unit Price :</b>&nbsp;&nbsp; <? echo "$_POST[price]"; ?></td>
			  </tr>
			  <tr>
				<td><b>Single Total Price :</b>&nbsp;&nbsp; <? echo ($_POST[price] * $_POST[qty]); ?> </td>
			  </tr></p>
			<tr>
				<td height="20px"></td>
			  </tr>
			  <?
			  $object = $sales->item_count($_SESSION[id]);
			  ?>
			<tr>
				<td>Your Shopping Cart contains
				<?
					if ($object == "1") {
					 echo "1 item.";
						} else 
						{ echo "$object items.";}
?>				</td>
			 </tr>
			<tr>
			  <td align="center"></td>
			  </tr>
			 <?
			  $object = $sales->total_price($_SESSION[id]);
			  ?>
			 <tr>
				<td>Your All Total Price is <? echo "$object"; ?><input type="hidden" name="coordinator_id" value="<?= $row['coordinator_id']?>"> </td>
			 </tr>
			 <tr>
			   <td height="30" align="center">&nbsp;</td>
			   </tr>
			 <tr>
				<td align="left"></td>
			 </tr>
			 
			
			 <tr>
				<td align="right"></td>
			 </tr>
			</table>					  </td>
                    </tr>
                      <tr>
				<td style="padding-left:40px;">You can <a href="sales_checkout.php">checkout</a> at any time.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php" class="style4">Continue Shopping</a></td>
			 </tr>
                  </table>
				  </td>
				 <td width="11"></td>
				</tr>
	    </table>
		  
	  </td>

	</tr>

	<tr>

		<td>

		<table border="0" cellpadding="0" cellspacing="0" width="760" id="table15" bgcolor="#FFFFFF" height="100%">

			<tr>

				<td class="copy">

				

<table align="center" border="0" cellpadding="0" cellspacing="0" width="775" id="table6" bgcolor="#FFFFFF" style="border-bottom: 3px solid #DF8A0B; border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC">
    
	
	<tr>
	  <td width="100%" class="copy" style="padding-left: 3px"></td>
	  </tr>
	
	
	<tr bgcolor="#CCCCCC">
	  <td height="2" class="copy" style="padding-left: 3px"></td>
	  </tr>

	<tr>
	  
	  <td height="30" class="foot">&nbsp;</td>
	  </tr>
</table>



</td>

			</tr>

		</table></td>

	</tr>

</table>





</body>



</html>